//
//  LifeDownCollectionCell.m
//  B-72K
//
//  Created by sos on 16/3/16.
//  Copyright © 2016年 sos. All rights reserved.
//

#import "LifeDownCollectionCell.h"

@implementation LifeDownCollectionCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.img = [[UIImageView alloc]init];
        
        [self.contentView addSubview:self.img];
        
        self.view = [[UIView alloc]init];
        self.view.backgroundColor = [UIColor blackColor];
        self.view.alpha = 0.3;
        [self.contentView addSubview:self.view];
        
        self.label = [[UILabel alloc]init];
        
        [self.contentView addSubview:self.label];
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    
    self.img.frame = CGRectMake(0, 0, layoutAttributes.frame.size.width, layoutAttributes.frame.size.height);
    
    self.view.frame = CGRectMake(0, layoutAttributes.frame.size.height-30*H, layoutAttributes.frame.size.width, 30*H);
    
    self.label.frame = CGRectMake(0, layoutAttributes.frame.size.height-30*H, layoutAttributes.frame.size.width, 30*H);
    self.label.font = [UIFont systemFontOfSize:13];
    self.label.textColor = [UIColor whiteColor];
    
    
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
